package com.sinosoft.application.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.sinosoft.application.dao.ApplicationMapper;
import com.sinosoft.application.entity.ApplicationEntity;

@Service
public class ApplicationService {

	@Autowired
	private ApplicationMapper applicationMapper;
	
	/**
	 * 查询状态不是noStatus的病历信息
	 * @param noStatu 状态
	 * @return 病历信息
	 */
	public List<ApplicationEntity> getApplicationByStatus(String noStatus){
		if(noStatus==null||"".equals(noStatus)){
			return null;
		}
		return applicationMapper.getApplicationByStatus(noStatus);
	}
	
	/**
	 * 根据id更新病例模板状态信息
	 * @param templates 更新条件
	 * @param status 更新状态值
	 */
	public void updateApplicationStatusById(List<ApplicationEntity> templates,String status){
		applicationMapper.updateApplicationStatusById(templates, status);
	}
}
